package com.example.project.model.bo;

/**
 * 分页参数
 * Created by Administrator on 2016/5/13.
 */
public class PagingParam {
    /**
     * 每页多少行，页面大小
     */
    public int prepage=25;
    /**
     * 当前页
     */
    public int page=1;


    public int getPage() {
        if(page<=0){
            page=1;
        }
        return page;
    }

    public int getOffset(){
        return (getPage()-1)*getPrepage();
    }

    public void setPage(int page) {
        this.page = page;
    }

    public int getPrepage() {
        if(prepage<=0){
            prepage=25;
        }
        return prepage;
    }

    public void setPrepage(int prepage) {
        this.prepage = prepage;
    }

}
